﻿@model IEnumerable<iTravel.Data.Flight>
@{
    ViewBag.Title = "Flights";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Flights</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Start
        </th>
        <th>
            End
        </th>
        <th>
            Number
        </th>
                <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @String.Format("{0:g}", item.Start)
            </td>
            <td>
                @String.Format("{0:g}", item.End)
            </td>
            <td>
                @item.Number
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
                @Html.ActionLink("Details", "Details", new { id = item.Id }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.Id })
            </td>
        </tr>
    }
</table>
